#include "TrainBoardManager.h"
#include "Timer.h"
#include "Command.h"

Timer* t;

void setup ()
{
  
  Serial.begin(9600);

  TrainBoardManager* tBM = new TrainBoardManager();

  t = Timer::getTimer();
  
}

void loop(){
  t->update();
}

/**
* \brief Called when a data is detected on serial port
* \param none
* \return none
*/
void serialEvent()
{
  while (Serial.available())
  {
    Communication::byteReceived(&Serial, Serial.read());
  }
}
